from matplotlib import pyplot as plt
from matplotlib import font_manager


my_font = font_manager.FontProperties(fname="STSONG.TTF")


a = ["星球崛起","敦刻尔克","蜘蛛侠","战狼2"]
b_16 = [15746,312,4497,319]
b_17 = [12357,156,2045,168]
b_18 = [2358,300,2358,362]

plt.figure(figsize=(20,8),dpi=80)

plt.barh(range(len(b_16)),b_16,color="red",label="第一天")

plt.barh(range(len(b_17)),b_17,color="yellow",label="第二天")
plt.barh(range(len(b_18)),b_18,color="black",label="第三天")

plt.yticks(range(len(a)),a,font_properties=my_font)

plt.legend(prop=my_font)
# 显示图
plt.show()